var userDao = require('../../../dao/userDao');
var logger = require('pomelo-logger').getLogger(__filename);
module.exports = function(app) {
	return new Handler(app);
};

var Handler = function(app) {
	this.app = app;
};
var pro = Handler.prototype;

pro.login = function(userData,arg2,cb) {
	userData.userId = 101;
	userData.nickName = 'lxf';
	var userId = 32209;
	userDao.getPlayer(userId, function(err, res) {
		if(!!err || !res) {
			logger.error('Get user for userDao failed! ' + err.stack);
			return;
		}
		userData.userId =  res[0].userId;
		cb(null,userData);
	});
};